<template>
  <div id="page">
    <div v-show="pageData.length>0" class="recordList flex-col" v-for="(item,index) in pageData">
      <div class="flex-row firstdiv" >
        <div class="flex-grow-1 ">提现金额(元)  <span class="red">{{item.totalMoney}}</span></div>
        <div class="flex-grow-1 lvse textRight" v-show="item.status=='已结算'">
          提现成功
        </div>
        <div class="flex-grow-1 textRight red" v-show="item.status=='待处理'">
          待处理
        </div>
      </div>
      <div class="flex-row secorddiv ">
        <div class="flex-grow-1">
          提现时间
        </div>
        <div class="flex-grow-1 textRight">
          {{item.insertTime}}
        </div>
      </div>
      <div class=" flex-row lastdiv">
        <div class="flex-grow-1">
          完成时间
        </div>
        <div class="flex-grow-1 textRight">
          {{item.finishTime}}
        </div>
        <div class="flex-grow-1 textRight" v-show="item.status=='待处理'">
          ………………
        </div>
      </div>
    </div>
    <div v-show="showNodata" class="nodata">--- 暂无数据 ---</div>
  </div>
</template>
<script>
  import {TIXIANRECOR} from 'src/const/uri'
  export default{

    data(){
      return {
        reqPage:1,
        reqPageSize:10,
        pageData:[],
        showNodata:false,
      }
    },
    created(){

    },
    watch:{
      pageData(val){
        if(val.length!==0){
          this.showNodata=false;
        }else{
          this.showNodata=true;
        }
      }
    },
    mounted(){
      this.initData();
      let spinner = document.getElementsByClassName('spinner')[0];
      spinner.style.display = 'none';
    },
    methods:{
      initData(){
        this.$ajax.get(TIXIANRECOR,{
          reqPage:this.reqPage,
          reqPageSize:this.reqPageSize
        },(res)=>{
          this.pageData=res.data.data;
          console.log(this.pageData)
        })
      },
      refreshData(responseCallback) {
        this.initData();
        responseCallback({code: '0'});
      },
    }
  }
</script>
<style lang="less" scoped>
  .nodata{
    padding-top:5rem;
    text-align: center;
    font-size:13px;
    color:#999999;
  }
  @import "index";
</style>
